﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:dyn="clr-namespace:DynamicLoader;assembly=DynamicLoader"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
    >

    <!--<ResourceDictionary Source="/SSCCMembership;component/MainResourceDictionary.xaml"/>-->




    <Color x:Key="Purple">#FF5A00BC</Color>
    <SolidColorBrush x:Key="PurpleBrush" Color="{StaticResource Purple}"/>
    
    <RadialGradientBrush GradientOrigin="-1,-1" x:Key="GreyBackground">
        <GradientStop Color="#FF726F6F" Offset="1"/>
        <GradientStop Color="White"/>
    </RadialGradientBrush>
    
    <Style x:Key="LargePurpleButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal" GeneratedDuration="0:0:0.5" To="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.5" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition To="Normal" GeneratedDuration="0:0:0.5" From="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Pressed" GeneratedDuration="0:0:0.5" To="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.1" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition To="Pressed" GeneratedDuration="0:0:0.5" From="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.1" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="GreyedOut"/>
                                        <DoubleAnimation Duration="0" To="0.8" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="GreyedOutText"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
           <!--Default button shape and colour appearance-->
                        <Rectangle RadiusY="20" RadiusX="20" StrokeThickness="8" Stroke="{StaticResource PurpleBrush}">
                            <Rectangle.Fill>
                                <RadialGradientBrush GradientOrigin="-1,-1">
                                    <GradientStop Color="#FF726F6F" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
           <!--Overlaid button shape and colour appearance; normally clear, but opacity changed depending on state-->
                        <Rectangle x:Name="GreyedOut" RadiusY="20" RadiusX="20" Opacity="0">
                            <Rectangle.Fill>
                                <RadialGradientBrush GradientOrigin="-1,-1">
                                    <GradientStop Color="#FF726F6F" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
            <!--Overlaid button shape and colour appearance; normally clear, but opacity changed depending on state-->
                        <Rectangle x:Name="PurpleHue" RadiusY="20" RadiusX="20" Opacity="0">
                            <Rectangle.Fill>
                                <RadialGradientBrush GradientOrigin="-1,-1">
                                    <GradientStop Color="{StaticResource Purple}" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <!--Default button text appearance-->
                        <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Margin="10"/>
            <!--Overlaid button text appearance; normally clear, but opacity changed depending on state-->
                        <TextBlock x:Name="GreyedOutText" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Margin="10" Opacity="0" Foreground="#FF726F6F"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
    </Style>
<sys:String x:Key="CreditString">Created by Forbes Lindesay for SSCC</sys:String>
    

    
    <ControlTemplate x:Key="InstantChangeDynamicContentLoader" TargetType="dyn:DynamicContentLoader">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="LoadStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition From="Loading" To="Loaded"/>
                        <VisualTransition From="Loaded" To="Loading"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Loading">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames  Storyboard.TargetName="LoadedContent" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames  Storyboard.TargetName="LoadingContent" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Loaded">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames  Storyboard.TargetName="LoadedContent" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames  Storyboard.TargetName="LoadingContent" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="LoadingContent">
                <ProgressBar Value="{TemplateBinding Progress}"/>
            </Grid>
            <Grid x:Name="LoadedContent" />
        </Grid>
    </ControlTemplate>

    
    <Style TargetType="TextBlock">
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
    </Style>
    <Style TargetType="TextBlock" x:Key="Heading">
        <Setter Property="FontSize" Value="32"/>
        <Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
    </Style>



    <!--
        <Style TargetType="TextBlock" x:Key="DataLabel">
            <Setter Property="TextAlignment" Value="Right"/>
            <Setter Property="FontSize" Value="18.667"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
        </Style>
        <Style TargetType="TextBox" x:Key="DataTextBox">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontSize" Value="16"/>
        </Style>
        <Style TargetType="sdk:AutoCompleteBox" x:Key="DataAutoCompleteBox">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontSize" Value="16"/>
        </Style>
-->
</ResourceDictionary>
